package com.lancoo.klgcourseware.entity.bean;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by pengmi on 2019/8/14 16:42
 * Description:知识点通用模型
 */
public class KlgCommonBean implements Serializable {

    //知识点Code
    private String klgCode;
    //知识点类型
    private String klgType;
    //知识点名字
    private String klgName;
    //英式音标
    private String un_phonetic;
    //英式音频
    private String un_voice;
    //美式音标
    private String us_phonetic;
    //美式音频
    private String us_voice;
    //释义
    private String explain;
    //经典例句-英
    private String classicSen;
    //经典例句-中
    private String classicTrain;
    //经典例句-音频
    private String classicVoice;
    //用法
    private String usage;
    //句型
    private String paraphrase;

    private boolean isShowMoreMeaning;

    private String shortExplan;
    //0-未收藏 1-用户收藏单词
    private int IsCollectWord;
    //分类
    private String headName;
    //是否显示头部
    private boolean isShowHead;
    //下标
    private int wordIndex;

    private int type;

    private String explanInList;

    //英文释义音频时长
    private String MeaningTime;
    //英文释义音频路径
    private String MeaningVoice;
    //英文释义
    private String EnglishMeaning;

    private boolean isHideBtn;

    private String oldKlgCode;

    private int wordType;//0-大纲生词，1-超纲，2-专有

    private String exmplainInDialog;

    private int totalCount;

    private String others;


    public String getOldKlgCode() {
        if(TextUtils.isEmpty(oldKlgCode)){
            return klgCode;
        }
        return oldKlgCode;
    }

    public void setOldKlgCode(String oldKlgCode) {
        this.oldKlgCode = oldKlgCode;
    }

    public String getKlgCode() {
        return klgCode;
    }

    public void setKlgCode(String klgCode) {
        this.klgCode = klgCode;
    }

    public String getKlgType() {
        return klgType;
    }

    public void setKlgType(String klgType) {
        this.klgType = klgType;
    }

    public String getKlgName() {
        return klgName;
    }

    public void setKlgName(String klgName) {
        this.klgName = klgName;
    }

    public String getUn_phonetic() {
        if(TextUtils.isEmpty(un_phonetic)){
            return "";
        }
        return un_phonetic;
    }

    public void setUn_phonetic(String un_phonetic) {
        this.un_phonetic = un_phonetic;
    }

    public String getUn_voice() {
        return un_voice;
    }

    public void setUn_voice(String un_voice) {
        this.un_voice = un_voice;
    }

    public String getUs_phonetic() {
        if(TextUtils.isEmpty(us_phonetic)){
            return "";
        }
        return us_phonetic;
    }

    public void setUs_phonetic(String us_phonetic) {
        this.us_phonetic = us_phonetic;
    }

    public String getUs_voice() {
        return us_voice;
    }

    public void setUs_voice(String us_voice) {
        this.us_voice = us_voice;
    }

    public String getExplain() {
        if(!TextUtils.isEmpty(exmplainInDialog)){
            return exmplainInDialog;
        }
        return explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public String getClassicSen() {
        if(TextUtils.isEmpty(classicSen)){
            return "";
        }
        return classicSen;
    }

    public void setClassicSen(String classicSen) {
        this.classicSen = classicSen;
    }

    public String getClassicTrain() {
        return classicTrain;
    }

    public void setClassicTrain(String classicTrain) {
        this.classicTrain = classicTrain;
    }

    public String getClassicVoice() {
        return classicVoice;
    }

    public void setClassicVoice(String classicVoice) {
        this.classicVoice = classicVoice;
    }

    public String getUsage() {
        if(TextUtils.isEmpty(usage)){
            return "";
        }
        return usage.replace("<br>","|")
                .replace("<","&gt;")
                .replace(">","&gl;").replace("|","<br>");
    }

    public void setUsage(String usage) {
        this.usage = usage;
    }

    public String getParaphrase() {
        return paraphrase;
    }

    public void setParaphrase(String paraphrase) {
        this.paraphrase = paraphrase;
    }

    public boolean isShowMoreMeaning() {
        return isShowMoreMeaning;
    }

    public void setShowMoreMeaning(boolean showMoreMeaning) {
        isShowMoreMeaning = showMoreMeaning;
    }

    public String getShortExplan() {
        return shortExplan;
    }

    public void setShortExplan(String shortExplan) {
        this.shortExplan = shortExplan;
    }

    public int getIsCollectWord() {
        return IsCollectWord;
    }

    public void setIsCollectWord(int isCollectWord) {
        IsCollectWord = isCollectWord;
    }

    public String getHeadName() {
        return headName;
    }

    public void setHeadName(String headName) {
        this.headName = headName;
    }

    public boolean isShowHead() {
        return isShowHead;
    }

    public void setShowHead(boolean showHead) {
        isShowHead = showHead;
    }

    public int getWordIndex() {
        return wordIndex;
    }

    public void setWordIndex(int wordIndex) {
        this.wordIndex = wordIndex;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getExplanInList() {
        if(explanInList==null){
            return "";
        }
        return explanInList;
//        return (explanInList.replace("<br>","|")
//                .replace("<","&lt;").replace(">","&gt;")).replace("|","<br>");
    }

    public void setExplanInList(String explanInList) {
        this.explanInList = explanInList;
    }

    public String getMeaningTime() {
        return MeaningTime;
    }

    public void setMeaningTime(String meaningTime) {
        MeaningTime = meaningTime;
    }

    public String getMeaningVoice() {
        return MeaningVoice;
    }

    public void setMeaningVoice(String meaningVoice) {
        MeaningVoice = meaningVoice;
    }

    public String getEnglishMeaning() {
        return EnglishMeaning;
    }

    public void setEnglishMeaning(String englishMeaning) {
        EnglishMeaning = englishMeaning;
    }

    public boolean isHideBtn() {
        return isHideBtn;
    }

    public void setHideBtn(boolean hideBtn) {
        isHideBtn = hideBtn;
    }


    public int getWordType() {
        return wordType;
    }

    public void setWordType(int wordType) {
        this.wordType = wordType;
    }

    public String getExmplainInDialog() {
        return exmplainInDialog;
    }

    public void setExmplainInDialog(String exmplainInDialog) {
        this.exmplainInDialog = exmplainInDialog;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public String getOthers() {
        return others;
    }

    public void setOthers(String others) {
        this.others = others;
    }
}
